import java.awt.Color;

public class GListPlayer {
	private int maxGamer=10;
	private int nowGamer=0;
	private int thisGamer=0;
	private GPlayer Gamers[];
	
	public GListPlayer(){
		Gamers=new GPlayer[maxGamer];
		nowGamer=1;
		thisGamer=0;
		Gamers[thisGamer]=new GPlayer();
	}
	
	public GListPlayer(String name){
		Gamers=new GPlayer[maxGamer];
		nowGamer=1;
		thisGamer=0;
		Gamers[thisGamer]=new GPlayer();
		Gamers[thisGamer].setName(name);
	}
	
	public void newGamer(){
		if (nowGamer<maxGamer) {
			Gamers[nowGamer]=new GPlayer();
			nowGamer++;
		}
	}
	
	public void newGamer(String name){
		if (nowGamer<maxGamer) {
			Gamers[nowGamer]=new GPlayer();
			Gamers[nowGamer].setName(name);
			nowGamer++;
		}
	}
	
	public void newGamer(String name, Color playerColor){
		if (nowGamer<maxGamer) {
			Gamers[nowGamer]=new GPlayer();
			Gamers[nowGamer].setName(name);
			Gamers[nowGamer].setColor(playerColor);
			nowGamer++;
		}
	}
	
	public void nextGamer(){
		thisGamer++;
		if (thisGamer==nowGamer) {
			thisGamer=0;
		}
	}
	
	public int howManyPlayer(){
		return nowGamer+1;
	}
	
	public Color getColor(){
		return Gamers[thisGamer].getColor();
	}
	
	public int getNumber(){
		return Gamers[thisGamer].getID();
	}
	
	public String getName(){
		return Gamers[thisGamer].getName();
	}
	
	public void setPlusTally(int tempTally){
		Gamers[thisGamer].plusTally(tempTally);
	}
	
	public int getTally(){
		return Gamers[thisGamer].getTally();
	}
}
